package br.utfpr.edu.bean;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name = "GFFGTF")
public class GffGtf implements Serializable{
	
	
	private static final long serialVersionUID = -1923886918261756198L;
	@Id
    @Column(name ="ID")
    @GeneratedValue(strategy=GenerationType.IDENTITY)
	private Integer id;
	@Column(name = "SEQNAME")
	private String seqName;
	@Column(name = "SOURCE")
	private String source;
	@Column(name = "FEATURE")
	private String feature;
	@Column(name = "START_")
	private String start;
	@Column(name = "END_")
	private String end;
	@Column(name = "SCORE")
	private String score;
	@Column(name = "STRAND")
	private String strand;
	@Column(name = "FRAME")
	private String frame;
	@Column(name = "GROUP_")
	private String group;
	@Column(name = "GFFGFT")
	private String gffGtf;
	@JoinColumn(name="USUARIO",referencedColumnName="US_ID")
	@ManyToOne(optional = false)
	private Usuario user;
	@JoinColumn(name="GENE",referencedColumnName="ID")
	@ManyToOne(optional = false)
	private Gene gene;
	
	public GffGtf(){
		user = new Usuario();
		gene = new Gene();
	}
		
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getSeqName() {
		return seqName;
	}
	public void setSeqName(String seqName) {
		this.seqName = seqName;
	}
	public String getSource() {
		return source;
	}
	public void setSource(String source) {
		this.source = source;
	}
	public String getFeature() {
		return feature;
	}
	public void setFeature(String feature) {
		this.feature = feature;
	}
	public String getStart() {
		return start;
	}
	public void setStart(String start) {
		this.start = start;
	}
	public String getEnd() {
		return end;
	}
	public void setEnd(String end) {
		this.end = end;
	}
	public String getScore() {
		return score;
	}
	public void setScore(String score) {
		this.score = score;
	}
	public String getStrand() {
		return strand;
	}
	public void setStrand(String strand) {
		this.strand = strand;
	}
	public String getFrame() {
		return frame;
	}
	public void setFrame(String frame) {
		this.frame = frame;
	}
	public String getGroup() {
		return group;
	}
	public void setGroup(String group) {
		this.group = group;
	}
	public String getGffGtf() {
		return gffGtf;
	}
	public void setGffGtf(String gffGtf) {
		this.gffGtf = gffGtf;
	}
	public Usuario getUser() {
		return user;
	}
	public void setUser(Usuario user) {
		this.user = user;
	}
	public Gene getGene() {
		return gene;
	}
	public void setGene(Gene gene) {
		this.gene = gene;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((id == null) ? 0 : id.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		GffGtf other = (GffGtf) obj;
		if (id == null) {
			if (other.id != null)
				return false;
		} else if (!id.equals(other.id))
			return false;
		return true;
	}
	
}
